<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Manually release stream flow from logger</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="seaslog.analyzerdetail.html">« SeasLog::analyzerDetail</a></li>
      <li style="float: right;"><a href="seaslog.construct.html">SeasLog::__construct »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="class.seaslog.html">SeasLog</a></li>
    <li>Manually release stream flow from logger</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="seaslog.closeloggerstream" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">SeasLog::closeLoggerStream</h1>
  <p class="verinfo">(PECL seaslog &gt;=1.8.6)</p><p class="refpurpose"><span class="refname">SeasLog::closeLoggerStream</span> &mdash; <span class="dc-title">Manually release stream flow from logger</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-seaslog.closeloggerstream-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><strong>SeasLog::closeLoggerStream</strong></span>(<span class="methodparam"><span class="type">int</span> <code class="parameter">$model</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$logger</code></span>): <span class="type">bool</span></div>

  <p class="para rdfs-comment">
   Manually release stream flow from logger.
   SeasLog caches the stream handle opened by the log logger to save the overhead of creating a stream. The handle will be automatically released at the end of the request.
   If in CLI mode, the process will also automatically release when it exits. Or you can use the following functions to manually release(manually release function needs to update SeasLog 1.8.6 or updated version).
  </p>

 </div>


 <div class="refsect1 parameters" id="refsect1-seaslog.closeloggerstream-parameters">
  <h3 class="title">参数</h3>
  <dl>
   
    <dt>
<code class="parameter">model</code></dt>

    <dd>

     <p class="para">
      Constant int.
      <ul class="simplelist">
       <li class="member"><a href="seaslog.constants.html#constant.seaslog-close-logger-stream-mod-all" class="link">SEASLOG_CLOSE_LOGGER_STREAM_MOD_ALL</a></li>
       <li class="member"><a href="seaslog.constants.html#constant.seaslog-close-logger-stream-mod-assign" class="link">SEASLOG_CLOSE_LOGGER_STREAM_MOD_ASSIGN</a></li>
      </ul>
     </p>
    </dd>

   
   
    <dt>
<code class="parameter">logger</code></dt>

    <dd>

     <p class="para">
      The logger name.
     </p>
    </dd>

   
  </dl>

 </div>


 <div class="refsect1 returnvalues" id="refsect1-seaslog.closeloggerstream-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Return TRUE on released stream flow success, FALSE on failure.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-seaslog.closeloggerstream-examples">
  <h3 class="title">范例</h3>
  <div class="example" id="example-3518">
   <p><strong>示例 #1 <span class="methodname"><strong>SeasLog::closeLoggerStream()</strong></span> example</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /><br />var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">SeasLog</span><span style="color: #007700">::</span><span style="color: #0000BB">closeLoggerStream</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">SeasLog</span><span style="color: #007700">::</span><span style="color: #0000BB">closeLoggerStream</span><span style="color: #007700">(</span><span style="color: #0000BB">SEASLOG_CLOSE_LOGGER_STREAM_MOD_ALL</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">SeasLog</span><span style="color: #007700">::</span><span style="color: #0000BB">closeLoggerStream</span><span style="color: #007700">(</span><span style="color: #0000BB">SEASLOG_CLOSE_LOGGER_STREAM_MOD_ASSIGN</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'logger_name'</span><span style="color: #007700">));<br /><br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
   </div>

   <div class="example-contents"><p>以上例程的输出类似于：</p></div>
   <div class="example-contents screen">
<div class="cdata"><pre>

bool(true)
bool(true)
bool(true)

</pre></div>
   </div>
  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-seaslog.closeloggerstream-seealso">
  <h3 class="title">参见</h3>
  <ul class="simplelist">
   <li class="member"><span class="methodname"><a href="seaslog.setlogger.html" class="methodname" rel="rdfs-seeAlso">SeasLog::setLogger()</a> - 设置 SeasLog 的 Logger 名</span></li>
   <li class="member"><span class="methodname"><a href="seaslog.getlastlogger.html" class="methodname" rel="rdfs-seeAlso">SeasLog::getLastLogger()</a> - 获得 SeasLog 最近的一次 Logger 名称</span></li>
  </ul>
 </div>


</div></div></div></body></html>